package by.grsu.bso.persistence.base;


import java.sql.SQLException;
import java.util.List;


public interface DAO<T> {

	public List<T> get();

	public T findById(final int id) throws SQLException;

	public List<T> findAll() throws SQLException;

	public List<T> findByExample(final T exampleInstance);

	public int countAll();

	public int countByExample(final T exampleInstance);

	public T save(final T entity) throws SQLException;

	public void delete(final int id) throws SQLException;
	
	public T create() throws SQLException;

}
